<?php
namespace app\api\repository;

class User
{

    public function addUser($name,$mobile)
    {
        //查询
        $rtn = \app\common\model\User::get($mobile);

        if(empty($rtn)){
            \app\common\model\User::create();
        }else{
            \app\common\model\User::update($name,$mobile);
        }

        return 2;
        //ceshi

    }
}